package route

import (
	"github.com/gin-gonic/gin"
	"nnxy-search-api/search-public-api/api/banner"
	"nnxy-search-api/search-public-api/middleware"
)

func InitBannerRoute(router *gin.RouterGroup) {
	r := router.Group("banner")
	{
		r.GET("", banner.List) // 获取订单列表
		r.GET("/:id", banner.Detail)
		r.POST("", banner.New).Use(middleware.JwtAuth())
		r.PUT("/:id", banner.Update).Use(middleware.JwtAuth())
		r.DELETE("/:id", banner.Delete).Use(middleware.JwtAuth())

	}
}
